LIBDIR = -L/usr/X11R6/lib
CC = gcc
CFLAGS = -Wall
LIBRARIES = -lglut -lGL -lGLU -lm
BIN = mundo
OBJ = sphere.o interfaz.o loadtga.o

all: $(BIN)

$(BIN) : $(OBJ)
	$(CC) $(CFLAGS) -o $@ $(LIBDIR) $? $(LIBRARIES)

sphere.o: sphere.c
	$(CC) -c sphere.c -o sphere.o $(CFLAGS)

interfaz.o: interfaz.c
	$(CC) -c interfaz.c -o interfaz.o $(CFLAGS)

loadtga.o: loadtga.c
	$(CC) -c loadtga.c -o loadtga.o $(CFLAGS)

clear:
	rm -f $(OBJ) $(BIN)

clean:
	rm -f $(OBJ)
